package com.anpy.bill.mapper;

import com.anpy.bill.entity.DateLineEntity;
import com.anpy.bill.model.vo.DateLineVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * 日历事件Mapper接口
 */
@Mapper
public interface DateLineMapper extends BaseMapper<DateLineEntity> {

    /**
     * 分页查询日历事件（带关联信息）
     */
    IPage<DateLineVO> selectDateLineWithDetails(Page<DateLineVO> page, 
                                               @Param("userId") Integer userId,
                                               @Param("eventTypeId") Long eventTypeId,
                                               @Param("startTime") Date startTime,
                                               @Param("endTime") Date endTime);

    /**
     * 根据ID查询日历事件详情（带关联信息）
     */
    DateLineVO selectDateLineDetailById(@Param("id") Long id, @Param("userId") Integer userId);
}
